import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user: {}, //用户信息
    router: [], //路由信息
  },
  getters: {},
  mutations: {
    //设置用户信息
    setuser(state, val) {
      state.user = val;
    },
    setrouter(state, val) {
      state.router = val;
    }
  },
  actions: {},
  modules: {}
})